<?php
 class CheckModel extends Model
 {
 	var $tablename='gaoji_member';
 	function CheckModel()
	{
		parent::Model();
		$this->load->database();
		
	}
	function check($username,$password)
	{
		$query = $this->db->get_where($this->tablename, array('username' => $username,'password'=>md5($password)));
		return $query->result();
	}
	
	function check_admin($username,$password){
		
		$query=$this->db->get_where('gaoji_adminmanager',array('username'=>$username,'password'=>md5($password)));
		return $query->result();
		
	}
 }

?>